class Write_data:
    def __init__(self,filename,data):
        self.filename=filename
        self.data =data #初始时为list类型
        self.mainProcess()

    def mainProcess(self):
        
        self.data.to_csv(self.filename, encoding="utf_8_sig")

        print("成功写入"+self.filename)

        